Repository navigation
Conversation
Add a Windows compatibility loader for coding-agent-wrapper, whose caw.storage imports POSIX-only fcntl and whose optional TUI provider imports pty/termios. Invoke the installed claude.cmd through cmd.exe and force UTF-8 for text-mode subprocess pipes so real Claude Code sessions work from Python on Windows. Add a regression test for importing caw without POSIX modules.
Normalize repository-relative artifact paths with POSIX separators so dependency analysis produces stable JSON and prompt paths on Windows. Advertise Windows and POSIX platform support, document PowerShell setup and runtime prerequisites, and add a required windows-latest CI job covering the Windows compatibility, repository filtering, and timeout tests.
Keep the Windows-specific regression test tracked despite the repository test ignore rules. The test verifies that the subscription backend exports Agent and ToolGroup without requiring POSIX-only fcntl, pty, or termios modules.
Disable coding-agent-wrapper auto-wait for CodeWiki completion, update, and module agents. caw 0.1.10 classifies provider response text using broad limit/reset heuristics and can sleep for 60 minutes after a normal Claude response; CodeWiki now returns control to its caller instead of blocking indefinitely. Extend the usage-ledger regression test to assert the explicit setting.
Reuse the existing documentation guard reminders when a caw module agent returns without creating its page. This prevents markdown-only responses from being treated as successful runs and gives the agent bounded opportunities to write the required file. Add a regression test covering the missing-file retry path.
Create a fresh caw agent and toolkit for each bounded documentation-write retry. caw starts and stops MCP servers per completion, so reusing the same toolkit caused FastMCP to reject the second attempt with a single-use session manager error. Keep the original module prompt on retries and add the write reminder, with regression coverage for fresh agent instances.
Allow each CodeWiki toolkit operation with its full MCP permission name instead of only the server prefix. Claude Code's non-interactive permission resolver did not expose str_replace_editor from a server-only rule, causing agents to report that no write tool was available and leaving documentation pages unwritten. Add regression coverage for the generated allowed-tools rule.
Keep CodeWiki's MCP editor as the preferred documentation writer while enabling Claude Code Write and Edit tools when the CLI does not expose the custom toolkit. This prevents documentation generation from failing solely because str_replace_editor is unavailable, while the existing file guard still verifies every page. Update prompts and retain regression coverage for MCP permissions.
Tell Claude Code the exact absolute documentation path whenever the native Write or Edit fallback is used. The repository-root working directory is required for source access, but caused fallback writers to create pages outside docs; explicit paths keep the existing documentation guard and output layout consistent.
Alejo2304
force-pushed
the
fix/62-windows-fcntl
branch
from
November 15, 2026 14:48
5214683 to
e2ea0f7
Compare
Collaborator
|
Thanks for working on Windows support. The changes are useful, but I’d like these addressed before merging:
The full suite passes locally on macOS (769 passed), but Windows still needs CI validation. Please also run Ruff formatting; three changed files currently fail the format check. |
Contributor
Author
|
Thank you @anhnh2002, I'll be working on the required changes to get this merged. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #62
This PR resolves remaining Windows compatibility issues so CodeWiki can run end-to-end on Windows (including the
claude-codeMCP workflow):claude.exeinvocation on Windows (codewiki/src/be/caw_backend.py):claude.cmdwas wrapped throughcmd.exe, which double-escaped quotes and split comma-separated--allowedToolsarguments, preventing Claude CLI from seeing the CodeWiki MCPstr_replace_editortool.claude.exeis resolved and invoked directly withoutcmd.exe/shell=True(with a fallback toclaude.cmdifclaude.exeis not found).codewiki/src/fe/background_worker.py,codewiki/src/be/agent_tools/str_replace_editor.py):rm -rfwithcleanup_repo_directory()(which handles Windows read-only.gitfiles).find ... -maxdepth 2instr_replace_editordirectoryviewwith a pure-PythonPath.iterdir()traversal.flake8()to pass arguments as a list withshell=Falseso paths with spaces work on Windows.codewiki/mcp/tools/doc_writer.py):newline="\n"towrite_text()calls so Windows\r\nconversion does not breakstr_replacematching.Testing
tests/test_mermaid_writers.py::test_mcp_write_edit_insert_undo_and_failed_editpasses on Windows after thedoc_writer.pyfix (13 passed intests/test_mermaid_writers.py).uv run --active pytest -o addopts="" -qon Windows (760 passed; 8 failures intests/test_zig_analyzer.pydue to optionaltree_sitter_zignot being installed in the local environment).codewiki generate --updatewithclaude-codeon Windows: confirmedToolSearchdiscoversmcp__codewiki_tools_*__str_replace_editor, creates documentation files, and passes Mermaid validation without errors.Testing was made with the provider claude_code and google.